import Vue from 'vue'
import Router from 'vue-router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Router)
Vue.use(ElementUI);
import Home from '../page/home/Home'
import About from '../page/about/About'
import Sort from '../page/sort/Sort'
import Cart from '../page/cart/Cart'
import Selected from '../page/home/childComps/NewStyle.vue'
import Popular from '../page/home/childComps/Popular.vue'
import NewStyle from '../page/home/childComps/NewStyle.vue'
import Detail from '../page/detail/Detail.vue'
export default new Router({
	mode: 'history', //加上这个属性 路径里面就没有#
	routes: [{
			path: '/', //默认路由显示页面
			redirect: '/home',
			children:[
				{
					path:'/Popular',
					component:Popular
				},
				{
					path:'/Selected',
					component:Selected
				},
				{
					path:'/NewStyle',
					component:NewStyle
				}
			]
		},
		{
			path: '/home',
			component: Home,
		},
		{
			path: '/sort',
			component: Sort
		},
		{
			path: '/cart',
			component: Cart
		},
		{
			path: '/about',
			component: About
		},
		{
			path:'/detail',
			component:Detail
		}

	]
})
